package com.ymttest.database.mapping.godmch;

import com.ymttest.database.model.godmch.point_statistics;
import com.ymttest.database.model.godmch.point_statisticsExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;

public interface point_statisticsMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table point_statistics
     *
     * @mbggenerated Fri Aug 14 16:12:51 CST 2020
     */
    @SelectProvider(type=point_statisticsSqlProvider.class, method="countByExample")
    int countByExample(point_statisticsExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table point_statistics
     *
     * @mbggenerated Fri Aug 14 16:12:51 CST 2020
     */
    @DeleteProvider(type=point_statisticsSqlProvider.class, method="deleteByExample")
    int deleteByExample(point_statisticsExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table point_statistics
     *
     * @mbggenerated Fri Aug 14 16:12:51 CST 2020
     */
    @Delete({
        "delete from point_statistics",
        "where user_id = #{user_id,jdbcType=INTEGER}"
    })
    int deleteByPrimaryKey(Integer user_id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table point_statistics
     *
     * @mbggenerated Fri Aug 14 16:12:51 CST 2020
     */
    @Insert({
        "insert into point_statistics (user_id, point_value, ",
        "point_status, remark, ",
        "createTime, updateTime)",
        "values (#{user_id,jdbcType=INTEGER}, #{point_value,jdbcType=INTEGER}, ",
        "#{point_status,jdbcType=INTEGER}, #{remark,jdbcType=VARCHAR}, ",
        "#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})"
    })
    int insert(point_statistics record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table point_statistics
     *
     * @mbggenerated Fri Aug 14 16:12:51 CST 2020
     */
    @InsertProvider(type=point_statisticsSqlProvider.class, method="insertSelective")
    int insertSelective(point_statistics record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table point_statistics
     *
     * @mbggenerated Fri Aug 14 16:12:51 CST 2020
     */
    @SelectProvider(type=point_statisticsSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="user_id", property="user_id", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="point_value", property="point_value", jdbcType=JdbcType.INTEGER),
        @Result(column="point_status", property="point_status", jdbcType=JdbcType.INTEGER),
        @Result(column="remark", property="remark", jdbcType=JdbcType.VARCHAR),
        @Result(column="createTime", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="updateTime", property="updateTime", jdbcType=JdbcType.TIMESTAMP)
    })
    List<point_statistics> selectByExample(point_statisticsExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table point_statistics
     *
     * @mbggenerated Fri Aug 14 16:12:51 CST 2020
     */
    @Select({
        "select",
        "user_id, point_value, point_status, remark, createTime, updateTime",
        "from point_statistics",
        "where user_id = #{user_id,jdbcType=INTEGER}"
    })
    @Results({
        @Result(column="user_id", property="user_id", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="point_value", property="point_value", jdbcType=JdbcType.INTEGER),
        @Result(column="point_status", property="point_status", jdbcType=JdbcType.INTEGER),
        @Result(column="remark", property="remark", jdbcType=JdbcType.VARCHAR),
        @Result(column="createTime", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="updateTime", property="updateTime", jdbcType=JdbcType.TIMESTAMP)
    })
    point_statistics selectByPrimaryKey(Integer user_id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table point_statistics
     *
     * @mbggenerated Fri Aug 14 16:12:51 CST 2020
     */
    @UpdateProvider(type=point_statisticsSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") point_statistics record, @Param("example") point_statisticsExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table point_statistics
     *
     * @mbggenerated Fri Aug 14 16:12:51 CST 2020
     */
    @UpdateProvider(type=point_statisticsSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") point_statistics record, @Param("example") point_statisticsExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table point_statistics
     *
     * @mbggenerated Fri Aug 14 16:12:51 CST 2020
     */
    @UpdateProvider(type=point_statisticsSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(point_statistics record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table point_statistics
     *
     * @mbggenerated Fri Aug 14 16:12:51 CST 2020
     */
    @Update({
        "update point_statistics",
        "set point_value = #{point_value,jdbcType=INTEGER},",
          "point_status = #{point_status,jdbcType=INTEGER},",
          "remark = #{remark,jdbcType=VARCHAR},",
          "createTime = #{createTime,jdbcType=TIMESTAMP},",
          "updateTime = #{updateTime,jdbcType=TIMESTAMP}",
        "where user_id = #{user_id,jdbcType=INTEGER}"
    })
    int updateByPrimaryKey(point_statistics record);
}